package com.example.deploysinggle.test1.common.general;

import com.example.deploysinggle.test1.common.redis.CacheService;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO 接口种如何拿到 properties文件 里内容和  --- 实现类实现接口  注入该APIConfiguration
 * @date 2024/12/11 13:22
 */
@Component
@Getter
public class APIConfiguration {

    //注入  @Autowired
    //@Value

    // cachservics

//    @Setter(onMethod_ = @Autowired)
    @Autowired
    private CacheService cacheService;

    @Value("${api.judge.random.expireTime}")//600000      ip：  60000
    private Long randomExpireTime;

    @Value("${api.judge.random.times}") //3
    private Long randomTimes;

    @Value("${api.judge.ip.times}") //100
    private Long ipTimes;

}
